package github.fafaovo.common.config;

import net.minecraftforge.common.ForgeConfigSpec;

import java.util.ArrayList;
import java.util.List;

public final class exampleconfig {
    public static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
    public static final ForgeConfigSpec SPEC;

    public static final ForgeConfigSpec.ConfigValue<Integer> example_integer;
    public static final ForgeConfigSpec.ConfigValue<Boolean> example_boolean;
    public static final ForgeConfigSpec.ConfigValue<Integer> machine_pos;
    public static final ForgeConfigSpec.ConfigValue<List<Integer>> buff_size_true;
    public static final ForgeConfigSpec.ConfigValue<List<Integer>> buff_size_false;
    public static final ForgeConfigSpec.ConfigValue<Integer> buff_value;
    public static final ForgeConfigSpec.ConfigValue<Integer> max_power;
    public static final ForgeConfigSpec.ConfigValue<Integer> power_h;
    public static final ForgeConfigSpec.ConfigValue<Integer> power_w;
    public static final ForgeConfigSpec.ConfigValue<Boolean> power_name_boolean;
    public static final ForgeConfigSpec.ConfigValue<String> power_name;

    public static final ForgeConfigSpec.ConfigValue<Boolean> sethome_boolean;
    public static final ForgeConfigSpec.ConfigValue<Boolean> back_boolean;
    public static final ForgeConfigSpec.ConfigValue<Boolean> gethand_boolean;

    static {
        BUILDER.push("Config for deep_capacity mod");

        example_boolean = BUILDER.comment("Increase or decrease . true: Increase.\n " +
                        "模组增加或者是减少能量")
                .define("deep_boolean", true);

        example_integer = BUILDER.comment("The speed at which the energy bar increases\n " +
                        "每段时间增加/减少的值")
                .defineInRange("deep",10,0,1000);


        BUILDER.pop();
        BUILDER.push("Machine");

        machine_pos = BUILDER.comment("The Machine Scope\n " +
                        "机器的范围")
                .defineInRange("machine_pos",20,0,100);

        BUILDER.pop();

        BUILDER.push("buff or debuff");

        buff_size_true = BUILDER.comment("if deep_boolean is true , give the following effect\n " +
                        "如果deep_boolean为真时,在一定值时会给与如下效果")
                .define("buff", new ArrayList<Integer>(){
            {
                add(18);
                add(2);
                add(27);
                add(31);
                add(4);
                add(19);
            }
        });
        //虚弱 缓慢 厄运 不祥之兆 挖掘疲劳 中毒

        buff_size_false = BUILDER.comment("if example_boolean is false , give the following effect\n " +
                        "如果example_boolean为假时,在一定值时会给与如下效果")
                .define("debuff", new ArrayList<Integer>(){
            {
                add(26);
                add(1);
                add(5);
                add(3);
                add(16);
                add(10);
                add(11);
            }
        });
        //幸运 速度 力量 急迫 夜视 生命恢复 抗性提升

        BUILDER.pop();

        BUILDER.push("GUI value");

        buff_value = BUILDER.comment("Values of requirements for each phase\n " +
                        "GUI每个阶段需求的值")
                .defineInRange("buff_value",2000,0,114514);

        max_power = BUILDER.comment("gui_capacity_Max\n " +
                        "GUI最大值")
                .defineInRange("max_power",20000,0,11451400);

        BUILDER.pop();

        BUILDER.push("GUI name");

        power_name_boolean = BUILDER.comment("When changing the value to true, the custom name is used\n " +
                        "改值为真时，将使用自定义的名字")
                .define("power_name_boolean", false);
        power_name = BUILDER.comment("gui capacity name\n " +
                        "自定义的名称")
                .define("gui_capacity_name","null");

        BUILDER.pop();

        BUILDER.push("GUI pos");

        power_h = BUILDER.comment("gui h").defineInRange("power_h",5,0,100);
        power_w = BUILDER.comment("gui w").defineInRange("power_w",10,0,100);



        BUILDER.pop();

        BUILDER.push("cmd bus");

        sethome_boolean = BUILDER.comment("Whether to enable the command\n " +
                        "是否开启命令")
                .define("set-home", true);
        back_boolean = BUILDER.comment("Whether to enable the command\n " +
                        "是否开启命令")
                .define("back", true);
        gethand_boolean = BUILDER.comment("Whether to enable the command\n " +
                        "是否开启命令")
                .define("gethand", false);

        BUILDER.pop();

        SPEC = BUILDER.build();
    }

}
